package com.apes.fn.scm.retailOrder.service.retailProcess.process;

import com.apes.fn.scm.retailOrder.model.RetailOrder;
import com.apes.fn.scm.retailOrder.service.retailProcess.CommonRetailDataProcess;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * 车险退保生成零售单，没有具体商品，零售单只是记录下数据
 * 收款方式部分，存在其他应收的，需要写账单
 * @author wuq
 * @Time 2022-7-5 9:27
 * @Description 车险退保处理器
 */
@Service
public class VehicleInsuranceSurrenderProcess extends CommonRetailDataProcess {

    @Override
    public void beforeSave(RetailOrder retailOrder) {
        retailOrder.setScene(null);
        retailOrder.setPostDate(new Date());
    }

    @Override
    public void afterSave(RetailOrder retailOrder) {
    }

    @Override
    public boolean support(String orderType) {
        return "vehicleInsuranceSurrender".equals(orderType);
    }
}
